home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-ppc / doc / vlink.doc < prev    next >
Text File  |  1999-01-01  |  8KB  |  188 lines

  1. vlink V0.6        VBCC ANSI C Compiler Reference Manual           vlink V0.6
  2.  
  3. NAME
  4.      vlink - linker for multiple file formats
  5.  
  6. SYNOPSIS
  7.      vlink [-dhrstvwxMRSX] [-B linkmode] [-b targetname] [-baseoff offset]
  8.            [-F filename] [-L library-search-path] [-l library-specifier]
  9.            [-multibase] [-nostdlib] [-o filename] [-sc] [-sd] [-V version]
  10.            [-y symbol] input-files...
  11.  
  12. DESCRIPTION
  13.      vlink combines the object and archive files given on the command line
  14.      into a new object file. The output object file is either an executable
  15.      program, a shared object suitable for loading at run-time, or an
  16.      object file that can once again be processed by vlink. Object files
  17.      and archives are processed in the order given on the command line.
  18.  
  19.      The file format of an input object file is determined automatically
  20.      by vlink. The default output file format is compiled in (see -v)
  21.      and may be changed by -b.
  22.  
  23.      Supported file formats:
  24.  
  25.      amigaos
  26.              The AmigaDos hunk format for M68k. Requires AmigaOS 2.04.
  27.              No shared objects. Small data offset: 0x7ffe. Linker
  28.              symbols: _DATA_BAS_, _DATA_LEN_, _BSS_LEN_ (PhxAss),
  29.              _LinkerDB, __BSSBAS, __BSSLEN (SASC/StormC), __DATA_BAS,
  30.              __DATA_LEN, __BSS_LEN, __RESIDENT (DICE-C). Automatic
  31.              constructor/destructor function tables: __ctors, __dtors.
  32.  
  33.      amigaehf
  34.              An extension of the AmigaDOS hunk format for the PowerPC,
  35.              32-bit, big endian, as introduced by Haage&Partner GmbH. No
  36.              executables (they are in amigaos format) or shared objects.
  37.              The same linker symbols, constructors/destructors as under
  38.              amigaos are supported. Additionally, "@_name" symbols will
  39.              be created on demand (when referenced).
  40.  
  41.      elf32ppcbe
  42.              ELF (executable linkable format) for PowerPC, 32-bit,
  43.              big endian. Small data offset: 0x7ff0. Linker symbols:
  44.              _SDA_BASE_ and _SDA2_BASE (EABI only). Automatic construc-
  45.              tor/destructor function tables will be placed into the
  46.              sections .ctors and .dtors.
  47.  
  48.      elf32powerup
  49.              ELF PowerPC 32-bit big endian for the PowerUp turbo boards
  50.              from Phase5. Main difference to elf32ppcbe is the format
  51.              of the executable (which is a relocatable object) and a new
  52.              linker symbol, _LinkerDB, for vbccppc-compatibility.
  53.  
  54.      The options are as follows:
  55.  
  56.      -Bdynamic
  57.              Specifies that linking against dynamic libraries can take
  58.              place. If a library specifier of the form -lx appears on
  59.              the command line, ld searches for a library of the from
  60.              libx.so.n.m (see the -l option) according to the search
  61.              rules in effect. If such a file can not be found a tradi-
  62.              tional archive is looked for. This options can appear
  63.              anywhere on the command line and is complementary to -Bstatic.
  64.  
  65.      -Bstatic
  66.              The counterpart of -Bdynamic. This option turns off dynamic
  67.              linking for all library specifiers until a -Bdynamic is once
  68.              again given. Any explicitly mentioned shared object encoun-
  69.              tered on the command line while this option is in effect is
  70.              flagged as an error.
  71.  
  72.      -Bshareable
  73.              Instructs the linker to build a shared object from the object
  74.              files rather than a normal executable image.
  75.  
  76.      -Bsymbolic
  77.              This option causes all symbolic references in the output to be
  78.              resolved in this link-edit session. The only remaining run-
  79.              time relocation requirements are base-relative relocations,
  80.              ie. translation with respect to the load address. Failure to
  81.              resolve any symbolic reference causes an error to be reported.
  82.  
  83.      -Bforcearchive
  84.              Force all members of archives to be loaded, whether or not such
  85.              members contribute a definition to any plain object files.
  86.              Useful for making a shared library from an archive of PIC
  87.              objects without having to unpack the archive.
  88.  
  89.      -b targetname
  90.              Specifies target file format for the output file. See
  91.              also "Supported file formats".
  92.  
  93.      -baseoff offset
  94.              Defines section offset for base-relative relocations. The
  95.              default offset is target-dependant (e.g. 0x7ffe for amigaos
  96.              and 0x7ff0 for elf32ppcbe).
  97.  
  98.      -dc     Force allocation of commons even when producing relocatable
  99.              output.
  100.  
  101.      -dn     Same as: -Bstatic
  102.  
  103.      -dy     Same as: -Bdynamic
  104.  
  105.      -F filename
  106.              A list of object file names is read from the specified file.
  107.              Useful, if the number of objects exceeds the length of the
  108.              command line.
  109.  
  110.      -h      Prints a short help text.
  111.  
  112.      -L library-search-path
  113.              Add path to the list of directories to search for libraries
  114.              specified with the -l option. When a default search path
  115.              was compiled in (see -v), then it is searched last.
  116.  
  117.      -l library-specifier
  118.              This option specifies a library to be considered for inclusion
  119.              in the output. If the -Bdynamic option is in effect, a shared
  120.              library of the form lib<spec>.so.m.n (where m is the major,
  121.              and n is the minor version number, respectively) is searched
  122.              for first. The library with the highest version found in the
  123.              search path is selected. If no shared library is found or
  124.              the -Bstatic option is in effect, an archive of the form
  125.              lib<spec>.a is looked for in the library search path.
  126.              For amigaos/amigaehf file formats, the libraries are called
  127.  
  128.      -M      Produce output about the mapping of segments of the input
  129.              files and the values assigned to symbols in the output file.
  130.  
  131.      -multibase
  132.              The default behaviour of vlink is to merge all sections
  133.              which are accessed base-relative. This guarantees a single
  134.              small data section, which can be accessed through a base
  135.              register.
  136.              If this is not desired - maybe you have several base re-
  137.              gisters and small data sections - you can disable this
  138.              behavoiur by specifying -multibase. 
  139.  
  140.      -nostdlib
  141.              Ignore default library search path, if one was compiled in.
  142.  
  143.      -o filename
  144.              Specifies the name of the output file. Defaults to "a.out".
  145.  
  146.      -R      If the target file format supports it, use the short
  147.              format for relocations.
  148.  
  149.      -r      Produce relocatable object file, suitable for another
  150.              linker pass.
  151.  
  152.      -S      Strip all debugger symbols from the output.
  153.  
  154.      -s      Strip all symbols from the output.
  155.  
  156.      -sc     Merge all code sections to a single code section.
  157.  
  158.      -sd     Merge all data and bss sections to a single data-bss section.
  159.  
  160.      -t      Trace the linker's file accesses.
  161.  
  162.      -V version
  163.              Minimum major version of shared object to be linked.
  164.  
  165.      -v      Prints vlink version string, default library search path
  166.              and implemented target file formats.
  167.  
  168.      -w      Suppress all warning messages.
  169.  
  170.      -X      Discard local symbols in the input files that start with the
  171.              letter "L" or with a dot.
  172.  
  173.      -x      Discard all local symbols in the input files.
  174.  
  175.      -y symbol
  176.              Trace the manipulations inflicted on symbol.
  177.  
  178. BUGS
  179.      Target elf32ppcbe can't generate shared objects or executables.
  180.      Target elf32powerup can't generate shared objects.
  181.      The following options are not really supported: -B, -d, -S, -X.
  182.      Option -R is untested and should be avoided.
  183.      Real debugger support (source level debugging, etc.) is still
  184.      missing for all target file formats.
  185.  
  186.  
  187. Frank Wille                  05-Feb-1999                frank@phoenix.owl.de
  188.